package com.sky.mapper.admin;

import com.sky.annotation.AutoFill;
import com.sky.enumeration.OperationType;
import com.sky.pojo.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper

public interface DishFlavorsMapper {
    /**
     * 批量插入口味是一个参数是一个集合
     * @param flavors
     */

    void addFlavors(@Param("flavors") List<DishFlavor> flavors);

    /**
     * 批量删除
     * @param ids
     */

    void deleteByIds(@Param("ids") Long[] ids);
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> getByDishId(Long id);
}
